<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Time.Calendar.Julian</span><span>
</span><span id="line-2"></span><span class="hs-special">(</span><span>
</span><span id="line-3"></span><span>    </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Data.Time.Calendar.JulianYearDay.html"><span class="hs-identifier">Data.Time.Calendar.JulianYearDay</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier">toJulian</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#fromJulian"><span class="hs-identifier">fromJulian</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#fromJulianValid"><span class="hs-identifier">fromJulianValid</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#showJulian"><span class="hs-identifier">showJulian</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#julianMonthLength"><span class="hs-identifier">julianMonthLength</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-comment">-- calendrical arithmetic</span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-comment">-- e.g. &quot;one month after March 31st&quot;</span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianMonthsClip"><span class="hs-identifier">addJulianMonthsClip</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianMonthsRollOver"><span class="hs-identifier">addJulianMonthsRollOver</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianYearsClip"><span class="hs-identifier">addJulianYearsClip</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianYearsRollOver"><span class="hs-identifier">addJulianYearsRollOver</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianDurationClip"><span class="hs-identifier">addJulianDurationClip</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianDurationRollOver"><span class="hs-identifier">addJulianDurationRollOver</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="Data.Time.Calendar.Julian.html#diffJulianDurationClip"><span class="hs-identifier">diffJulianDurationClip</span></a></span><span class="hs-special">,</span><span class="annot"><a href="Data.Time.Calendar.Julian.html#diffJulianDurationRollOver"><span class="hs-identifier">diffJulianDurationRollOver</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.Calendar.MonthDay.html"><span class="hs-identifier">Data.Time.Calendar.MonthDay</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.Calendar.JulianYearDay.html"><span class="hs-identifier">Data.Time.Calendar.JulianYearDay</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html"><span class="hs-identifier">Data.Time.Calendar.Days</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html"><span class="hs-identifier">Data.Time.Calendar.CalendarDiffDays</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Private.html"><span class="hs-identifier">Data.Time.Calendar.Private</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-comment">-- | Convert to proleptic Julian calendar. First element of result is year, second month number (1-12), third day (1-31).</span><span>
</span><span id="line-22"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-type">toJulian</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span id="toJulian"><span class="annot"><span class="annottext">toJulian :: Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var hs-var">toJulian</span></a></span></span><span> </span><span id="local-6989586621679068648"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068648"><span class="hs-identifier hs-var">date</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068647"><span class="hs-identifier hs-var">year</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068646"><span class="hs-identifier hs-var">month</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068645"><span class="hs-identifier hs-var">day</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068647"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068647"><span class="hs-identifier hs-var">year</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068644"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068644"><span class="hs-identifier hs-var">yd</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int)
</span><a href="Data.Time.Calendar.JulianYearDay.html#toJulianYearAndDay"><span class="hs-identifier hs-var">toJulianYearAndDay</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068648"><span class="hs-identifier hs-var">date</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068646"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068646"><span class="hs-identifier hs-var">month</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068645"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068645"><span class="hs-identifier hs-var">day</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; (Int, Int)
</span><a href="Data.Time.Calendar.MonthDay.html#dayOfYearToMonthAndDay"><span class="hs-identifier hs-var">dayOfYearToMonthAndDay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="Data.Time.Calendar.JulianYearDay.html#isJulianLeapYear"><span class="hs-identifier hs-var">isJulianLeapYear</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068647"><span class="hs-identifier hs-var">year</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068644"><span class="hs-identifier hs-var">yd</span></a></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-comment">-- | Convert from proleptic Julian calendar. First argument is year, second month number (1-12), third day (1-31).</span><span>
</span><span id="line-28"></span><span class="hs-comment">-- Invalid values will be clipped to the correct range, month first, then day.</span><span>
</span><span id="line-29"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#fromJulian"><span class="hs-identifier hs-type">fromJulian</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-30"></span><span id="fromJulian"><span class="annot"><span class="annottext">fromJulian :: Integer -&gt; Int -&gt; Int -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#fromJulian"><span class="hs-identifier hs-var hs-var">fromJulian</span></a></span></span><span> </span><span id="local-6989586621679068640"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068640"><span class="hs-identifier hs-var">year</span></a></span></span><span> </span><span id="local-6989586621679068639"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068639"><span class="hs-identifier hs-var">month</span></a></span></span><span> </span><span id="local-6989586621679068638"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068638"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Day
</span><a href="Data.Time.Calendar.JulianYearDay.html#fromJulianYearAndDay"><span class="hs-identifier hs-var">fromJulianYearAndDay</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068640"><span class="hs-identifier hs-var">year</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Int -&gt; Int
</span><a href="Data.Time.Calendar.MonthDay.html#monthAndDayToDayOfYear"><span class="hs-identifier hs-var">monthAndDayToDayOfYear</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="Data.Time.Calendar.JulianYearDay.html#isJulianLeapYear"><span class="hs-identifier hs-var">isJulianLeapYear</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068640"><span class="hs-identifier hs-var">year</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068639"><span class="hs-identifier hs-var">month</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068638"><span class="hs-identifier hs-var">day</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-comment">-- | Convert from proleptic Julian calendar. First argument is year, second month number (1-12), third day (1-31).</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- Invalid values will return Nothing.</span><span>
</span><span id="line-34"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#fromJulianValid"><span class="hs-identifier hs-type">fromJulianValid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-35"></span><span id="fromJulianValid"><span class="annot"><span class="annottext">fromJulianValid :: Integer -&gt; Int -&gt; Int -&gt; Maybe Day
</span><a href="Data.Time.Calendar.Julian.html#fromJulianValid"><span class="hs-identifier hs-var hs-var">fromJulianValid</span></a></span></span><span> </span><span id="local-6989586621679068635"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068635"><span class="hs-identifier hs-var">year</span></a></span></span><span> </span><span id="local-6989586621679068634"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068634"><span class="hs-identifier hs-var">month</span></a></span></span><span> </span><span id="local-6989586621679068633"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068633"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-36"></span><span>    </span><span id="local-6989586621679068632"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068632"><span class="hs-identifier hs-var">doy</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Int -&gt; Maybe Int
</span><a href="Data.Time.Calendar.MonthDay.html#monthAndDayToDayOfYearValid"><span class="hs-identifier hs-var">monthAndDayToDayOfYearValid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="Data.Time.Calendar.JulianYearDay.html#isJulianLeapYear"><span class="hs-identifier hs-var">isJulianLeapYear</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068635"><span class="hs-identifier hs-var">year</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068634"><span class="hs-identifier hs-var">month</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068633"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Maybe Day
</span><a href="Data.Time.Calendar.JulianYearDay.html#fromJulianYearAndDayValid"><span class="hs-identifier hs-var">fromJulianYearAndDayValid</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068635"><span class="hs-identifier hs-var">year</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068632"><span class="hs-identifier hs-var">doy</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | Show in ISO 8601 format (yyyy-mm-dd)</span><span>
</span><span id="line-40"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#showJulian"><span class="hs-identifier hs-type">showJulian</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-41"></span><span id="showJulian"><span class="annot"><span class="annottext">showJulian :: Day -&gt; String
</span><a href="Data.Time.Calendar.Julian.html#showJulian"><span class="hs-identifier hs-var hs-var">showJulian</span></a></span></span><span> </span><span id="local-6989586621679068629"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068629"><span class="hs-identifier hs-var">date</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; String
forall t. ShowPadded t =&gt; t -&gt; String
</span><a href="Data.Time.Calendar.Private.html#show4"><span class="hs-identifier hs-var">show4</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068627"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
forall t. ShowPadded t =&gt; t -&gt; String
</span><a href="Data.Time.Calendar.Private.html#show2"><span class="hs-identifier hs-var">show2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068625"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
forall t. ShowPadded t =&gt; t -&gt; String
</span><a href="Data.Time.Calendar.Private.html#show2"><span class="hs-identifier hs-var">show2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068624"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068627"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068627"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068625"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068625"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068624"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068624"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068629"><span class="hs-identifier hs-var">date</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- | The number of days in a given month according to the proleptic Julian calendar. First argument is year, second is month.</span><span>
</span><span id="line-45"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#julianMonthLength"><span class="hs-identifier hs-type">julianMonthLength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-46"></span><span id="julianMonthLength"><span class="annot"><span class="annottext">julianMonthLength :: Integer -&gt; Int -&gt; Int
</span><a href="Data.Time.Calendar.Julian.html#julianMonthLength"><span class="hs-identifier hs-var hs-var">julianMonthLength</span></a></span></span><span> </span><span id="local-6989586621679068623"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068623"><span class="hs-identifier hs-var">year</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Int
</span><a href="Data.Time.Calendar.MonthDay.html#monthLength"><span class="hs-identifier hs-var">monthLength</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Bool
</span><a href="Data.Time.Calendar.JulianYearDay.html#isJulianLeapYear"><span class="hs-identifier hs-var">isJulianLeapYear</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068623"><span class="hs-identifier hs-var">year</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#rolloverMonths"><span class="hs-identifier hs-type">rolloverMonths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span id="rolloverMonths"><span class="annot"><span class="annottext">rolloverMonths :: (Integer, Integer) -&gt; (Integer, Int)
</span><a href="Data.Time.Calendar.Julian.html#rolloverMonths"><span class="hs-identifier hs-var hs-var">rolloverMonths</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679068620"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068620"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068619"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068619"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068620"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#div"><span class="hs-identifier hs-var">div</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068619"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#mod"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068619"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianMonths"><span class="hs-identifier hs-type">addJulianMonths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span id="addJulianMonths"><span class="annot"><span class="annottext">addJulianMonths :: Integer -&gt; Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonths"><span class="hs-identifier hs-var hs-var">addJulianMonths</span></a></span></span><span> </span><span id="local-6989586621679068614"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068614"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679068613"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068613"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068612"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068611"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068610"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-53"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068609"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068609"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068608"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068608"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068610"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068610"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068613"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-54"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068612"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068612"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068611"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068611"><span class="hs-identifier hs-var">m'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Integer, Integer) -&gt; (Integer, Int)
</span><a href="Data.Time.Calendar.Julian.html#rolloverMonths"><span class="hs-identifier hs-var">rolloverMonths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068609"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068608"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068614"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-comment">-- | Add months, with days past the last day of the month clipped to the last day.</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- For instance, 2005-01-30 + 1 month = 2005-02-28.</span><span>
</span><span id="line-58"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianMonthsClip"><span class="hs-identifier hs-type">addJulianMonthsClip</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-59"></span><span id="addJulianMonthsClip"><span class="annot"><span class="annottext">addJulianMonthsClip :: Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsClip"><span class="hs-identifier hs-var hs-var">addJulianMonthsClip</span></a></span></span><span> </span><span id="local-6989586621679068604"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068604"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679068603"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068603"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Int -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#fromJulian"><span class="hs-identifier hs-var">fromJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068602"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068601"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068600"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068602"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068602"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068601"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068601"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068600"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068600"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonths"><span class="hs-identifier hs-var">addJulianMonths</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068604"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068603"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">-- | Add months, with days past the last day of the month rolling over to the next month.</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- For instance, 2005-01-30 + 1 month = 2005-03-02.</span><span>
</span><span id="line-64"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianMonthsRollOver"><span class="hs-identifier hs-type">addJulianMonthsRollOver</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-65"></span><span id="addJulianMonthsRollOver"><span class="annot"><span class="annottext">addJulianMonthsRollOver :: Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsRollOver"><span class="hs-identifier hs-var hs-var">addJulianMonthsRollOver</span></a></span></span><span> </span><span id="local-6989586621679068599"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068599"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679068598"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068598"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Days.html#addDays"><span class="hs-identifier hs-var">addDays</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068596"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Int -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#fromJulian"><span class="hs-identifier hs-var">fromJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068595"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068594"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068595"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068595"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068594"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068594"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068596"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068596"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonths"><span class="hs-identifier hs-var">addJulianMonths</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068599"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068598"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Add years, matching month and day, with Feb 29th clipped to Feb 28th if necessary.</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- For instance, 2004-02-29 + 2 years = 2006-02-28.</span><span>
</span><span id="line-70"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianYearsClip"><span class="hs-identifier hs-type">addJulianYearsClip</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-71"></span><span id="addJulianYearsClip"><span class="annot"><span class="annottext">addJulianYearsClip :: Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianYearsClip"><span class="hs-identifier hs-var hs-var">addJulianYearsClip</span></a></span></span><span> </span><span id="local-6989586621679068593"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068593"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsClip"><span class="hs-identifier hs-var">addJulianMonthsClip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068593"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- | Add years, matching month and day, with Feb 29th rolled over to Mar 1st if necessary.</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- For instance, 2004-02-29 + 2 years = 2006-03-01.</span><span>
</span><span id="line-75"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianYearsRollOver"><span class="hs-identifier hs-type">addJulianYearsRollOver</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-76"></span><span id="addJulianYearsRollOver"><span class="annot"><span class="annottext">addJulianYearsRollOver :: Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianYearsRollOver"><span class="hs-identifier hs-var hs-var">addJulianYearsRollOver</span></a></span></span><span> </span><span id="local-6989586621679068591"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068591"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsRollOver"><span class="hs-identifier hs-var">addJulianMonthsRollOver</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068591"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-comment">-- | Add months (clipped to last day), then add days</span><span>
</span><span id="line-79"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianDurationClip"><span class="hs-identifier hs-type">addJulianDurationClip</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-80"></span><span id="addJulianDurationClip"><span class="annot"><span class="annottext">addJulianDurationClip :: CalendarDiffDays -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianDurationClip"><span class="hs-identifier hs-var hs-var">addJulianDurationClip</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span> </span><span id="local-6989586621679068589"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068589"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679068588"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068588"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679068587"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068587"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Days.html#addDays"><span class="hs-identifier hs-var">addDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068588"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">(Day -&gt; Day) -&gt; Day -&gt; Day
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsClip"><span class="hs-identifier hs-var">addJulianMonthsClip</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068589"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068587"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | Add months (rolling over to next month), then add days</span><span>
</span><span id="line-83"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#addJulianDurationRollOver"><span class="hs-identifier hs-type">addJulianDurationRollOver</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span>
</span><span id="line-84"></span><span id="addJulianDurationRollOver"><span class="annot"><span class="annottext">addJulianDurationRollOver :: CalendarDiffDays -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianDurationRollOver"><span class="hs-identifier hs-var hs-var">addJulianDurationRollOver</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span> </span><span id="local-6989586621679068586"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068586"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679068585"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068585"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679068584"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068584"><span class="hs-identifier hs-var">day</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Days.html#addDays"><span class="hs-identifier hs-var">addDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068585"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">(Day -&gt; Day) -&gt; Day -&gt; Day
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianMonthsRollOver"><span class="hs-identifier hs-var">addJulianMonthsRollOver</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068586"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068584"><span class="hs-identifier hs-var">day</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | Calendrical difference, with as many whole months as possible</span><span>
</span><span id="line-87"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#diffJulianDurationClip"><span class="hs-identifier hs-type">diffJulianDurationClip</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span>
</span><span id="line-88"></span><span id="diffJulianDurationClip"><span class="annot"><span class="annottext">diffJulianDurationClip :: Day -&gt; Day -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.Julian.html#diffJulianDurationClip"><span class="hs-identifier hs-var hs-var">diffJulianDurationClip</span></a></span></span><span> </span><span id="local-6989586621679068583"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068583"><span class="hs-identifier hs-var">day2</span></a></span></span><span> </span><span id="local-6989586621679068582"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068582"><span class="hs-identifier hs-var">day1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-89"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068581"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068581"><span class="hs-identifier hs-var">y1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068580"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068580"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068579"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068579"><span class="hs-identifier hs-var">d1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068582"><span class="hs-identifier hs-var">day1</span></a></span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068578"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068578"><span class="hs-identifier hs-var">y2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068577"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068577"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068576"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068576"><span class="hs-identifier hs-var">d2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068583"><span class="hs-identifier hs-var">day2</span></a></span><span>
</span><span id="line-91"></span><span>    </span><span id="local-6989586621679068571"><span class="annot"><span class="annottext">ym1 :: Integer
</span><a href="#local-6989586621679068571"><span class="hs-identifier hs-var hs-var">ym1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068581"><span class="hs-identifier hs-var">y1</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068580"><span class="hs-identifier hs-var">m1</span></a></span><span>
</span><span id="line-92"></span><span>    </span><span id="local-6989586621679068566"><span class="annot"><span class="annottext">ym2 :: Integer
</span><a href="#local-6989586621679068566"><span class="hs-identifier hs-var hs-var">ym2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068578"><span class="hs-identifier hs-var">y2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068577"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-93"></span><span>    </span><span id="local-6989586621679068564"><span class="annot"><span class="annottext">ymdiff :: Integer
</span><a href="#local-6989586621679068564"><span class="hs-identifier hs-var hs-var">ymdiff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068566"><span class="hs-identifier hs-var">ym2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068571"><span class="hs-identifier hs-var">ym1</span></a></span><span>
</span><span id="line-94"></span><span>    </span><span id="local-6989586621679068554"><span class="annot"><span class="annottext">ymAllowed :: Integer
</span><a href="#local-6989586621679068554"><span class="hs-identifier hs-var hs-var">ymAllowed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-95"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068583"><span class="hs-identifier hs-var">day2</span></a></span><span> </span><span class="annot"><span class="annottext">Day -&gt; Day -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068582"><span class="hs-identifier hs-var">day1</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-96"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068576"><span class="hs-identifier hs-var">d2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068579"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068564"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068564"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-97"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068576"><span class="hs-identifier hs-var">d2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068579"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068564"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068564"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621679068552"><span class="annot"><span class="annottext">dayAllowed :: Day
</span><a href="#local-6989586621679068552"><span class="hs-identifier hs-var hs-var">dayAllowed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CalendarDiffDays -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianDurationClip"><span class="hs-identifier hs-var">addJulianDurationClip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-var">CalendarDiffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068554"><span class="hs-identifier hs-var">ymAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068582"><span class="hs-identifier hs-var">day1</span></a></span><span>
</span><span id="line-99"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-var">CalendarDiffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068554"><span class="hs-identifier hs-var">ymAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; CalendarDiffDays) -&gt; Integer -&gt; CalendarDiffDays
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Day -&gt; Day -&gt; Integer
</span><a href="Data.Time.Calendar.Days.html#diffDays"><span class="hs-identifier hs-var">diffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068583"><span class="hs-identifier hs-var">day2</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068552"><span class="hs-identifier hs-var">dayAllowed</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | Calendrical difference, with as many whole months as possible.</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- Same as 'diffJulianDurationClip' for positive durations.</span><span>
</span><span id="line-103"></span><span class="annot"><a href="Data.Time.Calendar.Julian.html#diffJulianDurationRollOver"><span class="hs-identifier hs-type">diffJulianDurationRollOver</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.Days.html#Day"><span class="hs-identifier hs-type">Day</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-type">CalendarDiffDays</span></a></span><span>
</span><span id="line-104"></span><span id="diffJulianDurationRollOver"><span class="annot"><span class="annottext">diffJulianDurationRollOver :: Day -&gt; Day -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.Julian.html#diffJulianDurationRollOver"><span class="hs-identifier hs-var hs-var">diffJulianDurationRollOver</span></a></span></span><span> </span><span id="local-6989586621679068550"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068550"><span class="hs-identifier hs-var">day2</span></a></span></span><span> </span><span id="local-6989586621679068549"><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068549"><span class="hs-identifier hs-var">day1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068548"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068548"><span class="hs-identifier hs-var">y1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068547"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068547"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068546"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068546"><span class="hs-identifier hs-var">d1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068549"><span class="hs-identifier hs-var">day1</span></a></span><span>
</span><span id="line-106"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679068545"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068545"><span class="hs-identifier hs-var">y2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068544"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068544"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679068543"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068543"><span class="hs-identifier hs-var">d2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Day -&gt; (Integer, Int, Int)
</span><a href="Data.Time.Calendar.Julian.html#toJulian"><span class="hs-identifier hs-var">toJulian</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068550"><span class="hs-identifier hs-var">day2</span></a></span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621679068538"><span class="annot"><span class="annottext">ym1 :: Integer
</span><a href="#local-6989586621679068538"><span class="hs-identifier hs-var hs-var">ym1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068548"><span class="hs-identifier hs-var">y1</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068547"><span class="hs-identifier hs-var">m1</span></a></span><span>
</span><span id="line-108"></span><span>    </span><span id="local-6989586621679068533"><span class="annot"><span class="annottext">ym2 :: Integer
</span><a href="#local-6989586621679068533"><span class="hs-identifier hs-var hs-var">ym2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068545"><span class="hs-identifier hs-var">y2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">12</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068544"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679068531"><span class="annot"><span class="annottext">ymdiff :: Integer
</span><a href="#local-6989586621679068531"><span class="hs-identifier hs-var hs-var">ymdiff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068533"><span class="hs-identifier hs-var">ym2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068538"><span class="hs-identifier hs-var">ym1</span></a></span><span>
</span><span id="line-110"></span><span>    </span><span id="local-6989586621679068523"><span class="annot"><span class="annottext">ymAllowed :: Integer
</span><a href="#local-6989586621679068523"><span class="hs-identifier hs-var hs-var">ymAllowed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-111"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068550"><span class="hs-identifier hs-var">day2</span></a></span><span> </span><span class="annot"><span class="annottext">Day -&gt; Day -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068549"><span class="hs-identifier hs-var">day1</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-112"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068543"><span class="hs-identifier hs-var">d2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068546"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068531"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068531"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-113"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068543"><span class="hs-identifier hs-var">d2</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679068546"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068531"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068531"><span class="hs-identifier hs-var">ymdiff</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621679068522"><span class="annot"><span class="annottext">dayAllowed :: Day
</span><a href="#local-6989586621679068522"><span class="hs-identifier hs-var hs-var">dayAllowed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CalendarDiffDays -&gt; Day -&gt; Day
</span><a href="Data.Time.Calendar.Julian.html#addJulianDurationRollOver"><span class="hs-identifier hs-var">addJulianDurationRollOver</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-var">CalendarDiffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068523"><span class="hs-identifier hs-var">ymAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068549"><span class="hs-identifier hs-var">day1</span></a></span><span>
</span><span id="line-115"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; CalendarDiffDays
</span><a href="Data.Time.Calendar.CalendarDiffDays.html#CalendarDiffDays"><span class="hs-identifier hs-var">CalendarDiffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679068523"><span class="hs-identifier hs-var">ymAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">(Integer -&gt; CalendarDiffDays) -&gt; Integer -&gt; CalendarDiffDays
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Day -&gt; Day -&gt; Integer
</span><a href="Data.Time.Calendar.Days.html#diffDays"><span class="hs-identifier hs-var">diffDays</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068550"><span class="hs-identifier hs-var">day2</span></a></span><span> </span><span class="annot"><span class="annottext">Day
</span><a href="#local-6989586621679068522"><span class="hs-identifier hs-var">dayAllowed</span></a></span><span>
</span><span id="line-116"></span></pre></body></html>